package com.fh.feign;



import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.utils.bean.*;
import com.utils.pulc.ResultBody;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

@FeignClient(name = "nacos-demo1",path = "demo1")
public interface Demo2Feign {

    /**
     * @param safety
     * @return com.fh.utils.ResultBody<java.lang.Object>
     * @description: 登录
     * @author whf
     * @date 2023/4/25 15:01
     */
    @PostMapping("index")
    ResultBody<Safety> index(@Valid @RequestBody Safety safety);

    /**
     * @description: 密码正确就会对个人信息进行查询
     * @author whf
     * @date 2023/5/10 14:12
     * @param safety
     * @return com.utils.bean.User
     */
    @PostMapping("user")
    ResultBody<User> getUser(@Valid @RequestBody Safety safety);

    /**
     * @param user 注册接口对个人信息表表进行添加
     * @return com.fh.utils.ResultBody<java.lang.Object>
     * @description:
     * @author whf
     * @date 2023/4/25 15:02
     */
    @PostMapping("setUser")
    ResultBody<User> setUser(@Valid @RequestBody User user);
    /**
     * @param safety 对账号密码进行保存
     * @return com.fh.utils.ResultBody<java.lang.Object>
     * @description:
     * @author whf
     * @date 2023/4/25 15:02
     */
    @PostMapping("setSafety")
    ResultBody<Safety> setUser(@Valid @RequestBody Safety safety);

    /**
     * @param Safetyoruser 对账号密码进行保存
     * @return com.fh.utils.ResultBody<java.lang.Object>
     * @description:
     * @author whf
     * @date 2023/4/25 15:02
     */
    @PostMapping("setSafetyoruser")
    ResultBody<Safetyoruser> setSafetyoruser(@Valid @RequestBody Safetyoruser Safetyoruser);


    /**
     * @param substitute
     * @return java.util.List<com.fh.bean.Resource>
     * @description: 通过个人的Id得到他的职位信息
     * @author whf
     * @date 2023/4/26 8:28
     */
    @PostMapping("selectAll")
    ResultBody<List<Role>> selectAll(@RequestBody Substitute substitute);

    /**
     * @description: 分页查询
     * @author whf
     * @date 2023/5/11 8:37
     * @param customerPage
     * @return com.utils.pulc.ResultBody<com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.utils.bean.Customer>>
     */
    @PostMapping("page")
    public ResultBody<Page<Customer>> page(@RequestBody CustomerPage customerPage);

    /**
     * @description: 对客户的信息进行添加
     * @author whf
     * @date 2023/5/11 14:36
     * @param customer
     * @return com.utils.pulc.ResultBody<java.lang.Object>
     */
    @PostMapping("save")
    public ResultBody<Object> save(@RequestBody Customer customer);


    /**
     * @description: 对他的ID进行删除
     * @author whf
     * @date 2023/5/17 9:20
     * @param
     * @return null
     */
    @PostMapping("delCostomer")
    ResultBody<Object> delCostomer(@RequestBody CostomerID costomerID);
    /**
     * @description: 对一群人进行删除
     * @author whf
     * @date 2023/5/17 9:22
     * @param id
     * @return com.utils.pulc.ResultBody<java.lang.Object>
     */
    @PostMapping("delCostomers")
    ResultBody<Object> delCostomers(@RequestBody List<CostomerID> costomerIDS);

    /**
     * @description: 根据条件查询
     * @author whf
     * @date 2023/5/17 10:33
     * @return com.utils.pulc.ResultBody<java.util.List<com.utils.bean.Customer>>
     */
    @PostMapping("getCustomerIF")
    ResultBody<List<Customer>> getCustomerIF(@RequestBody Customer customer);

    /**
     * @description: 当权限最大的人查询 得到全部的信息 包括员工
     * @author whf
     * @date 2023/5/17 14:42
     * @return com.utils.pulc.ResultBody<java.util.List<com.utils.bean.User>>
     */
    @PostMapping("getBoss")
    ResultBody<Page<Customer>> getBoss(@Valid @RequestBody CustomerPage customerPage);

    /**
     * @description: 对图片进行添加
     * @author whf
     * @date 2023/6/1 15:04
     * @param images
     * @return com.utils.pulc.ResultBody<java.lang.Object>
     */
    @PostMapping("setMultipartFile")
    public ResultBody<Object> setMultipartFile(@RequestBody Images images);

    /**
     * @description: 查询照片
     * @author whf
     * @date 2023/6/1 15:00
     * @param imagesOrUser
     * @return com.utils.pulc.ResultBody<java.util.List<com.utils.bean.Images>>
     */
    @PostMapping("getImages")
    ResultBody<List<Images>> getImage(@RequestBody ImagesOrUser imagesOrUser);

    /**
     * @description: 对图片进行删除
     * @author whf
     * @date 2023/6/1 17:23
     * @param imagesUpdate
     * @return com.utils.pulc.ResultBody<java.lang.Object>
     */
    @PostMapping("updateImages")
    public ResultBody<Object> updateImages(@RequestBody ImagesUpdate imagesUpdate);

    @PostMapping("updateMoney")
    public ResultBody<Object> updateMoney(@RequestBody Money money);
}
